{include file=$header_start}
{strip}
<link rel="stylesheet" type="text/css" href="{$siteroot}/templates/default/style/dashboard.css">
<script src="{$siteroot}/includes/js/admin/editpostjob.js" type="text/javascript"></script>
{/strip}
{literal}
<script type="text/javascript">

function showJobType(jid)
{
	if(jid!='')
	{
		ajax.sendrequest("GET",SITEROOT + "/modules/register/show_jobtype.php",{jobtypeid:jid},"","isJobType");
	}
	else
		document.getElementById('jobtype').value='';
}

</script>
{/literal}
{include file=$header_end}
   <!-- MIDDLE CONTAIN GOES HERE -->
<section class="middle_portion">
	<section class="inner_head">Dashboard</section>
    <section class="inner_containstart">
    	<!-- dashboard Left Content Start -->
        	{include file=$cms_left_content}
        <!-- dashboard Left Content End -->
        <!-- dashboard Right Content Start -->
        	<section class="dash_right">            	                
            {if $msg}{$msg}{/if}
            	<section class="title_box">
                    <h4><a href="{$siteroot}/jobs/myjobs/">My Job</a> >> Edit Job <a href="{$siteroot}/jobs/myjobs/" class="rF" > BACK</a></h4>
                    <section class="clear"></section>
                </section>
                <form name="frmEditjob" id="frmEditjob" action="" method="post" enctype="multipart/form-data">
		         <input type="hidden" name="hidden_jobid" id="hidden_jobid" value="{$smarty.get.id1|base64_decode}" />
                 

                <section class="profile_wrapp">
                    <dl>
                        <dt><label>Trade Category :  </label></dt>
                        <dd><select class="select" name="trade" id="trade" onchange="showJobType(this.value);">
                          <option value="">Select Trade Category</option>
                           {section name=i loop=$newtradecategoryArray}
                                    <option value="{$newtradecategoryArray[i].id}" {if $job_details.trade_id eq $newtradecategoryArray[i].id} selected="selected" {/if}>{$newtradecategoryArray[i].trade_category}</option>
                           {/section} 
                          </select>
                          </dd>
                        <section class="clear"></section>
                    </dl>
                    <dl>
                        <dt><label>Job Type : </label></dt>
                        <dd>
           	              <div id="isJobType">
                          <select class="select" name="jobtype" id="jobtype">
                          <option value="">Select Job Type</option>
                         {section name=i loop=$jobtypeArray}
                            <option value="{$jobtypeArray[i].id}" {if $job_details.jobtype_id eq $jobtypeArray[i].id} selected="selected" {/if}>{$jobtypeArray[i].trade_category}</option>
                         {/section} 
                          </select>
                          </div>
                        </dd>
                        <section class="clear"></section>
                    </dl>
                    <section class="clear"></section>
                    <dl>
                        <dt><label>Job Description : </label></dt>
                        <dd><textarea id="job_desc" name="job_desc" rows="5" cols="45" class="textarea" >{$job_details.job_desc}</textarea></dd>
                        <section class="clear"></section>
                    </dl>
                    <dl>
                        <dt><label>Work Start In : </label></dt>
                        <dd><select name="work_to_start" id="work_to_start" class="select" >
                        	<option value="">- Select -</option>
                            <option value="asap" {if $job_details.workstart eq 'asap'} selected="selected" {/if}>As soon as possible</option>
                            <option value="1 week" {if $job_details.workstart eq '1 week'} selected="selected" {/if}>1 week</option>
                            <option value="2 weeks" {if $job_details.workstart eq '2 weeks'} selected="selected" {/if}>2 weeks</option>
                            <option value="1 month" {if $job_details.workstart eq '1 month'} selected="selected" {/if}>1 month +</option>
                        	</select></dd>
                        <section class="clear"></section>
                    </dl>
					
					 <dl>
                        <dt><label>State : </label></dt>
                        <dd><select name="state_id" id="state_id" class="select" >
                        	<option value="">- Select State -</option>
                           {section name=i loop=$stateArray}
						<option value="{$stateArray[i].state_id}" {if $job_details.state_id eq $stateArray[i].state_id} selected="selected"  {/if}>{$stateArray[i].state_name}</option>
						{/section}  
                        	</select></dd>
                        <section class="clear"></section>
                    </dl>
					
                    <section class="clear"></section>
                     <dl>
                        <dt><label>Approx Budget : </label></dt>
                        <dd><select class="select" name="approx_budget" id="approx_budget">
              				<option value="">Select an approx budget</option>
                            {section name=i loop=$getallactivebudgetArray}
                                <option value="{$getallactivebudgetArray[i].budget_id}" {if $job_details.approx_budget eq $getallactivebudgetArray[i].budget_id} selected="selected" {/if}>Under ${$getallactivebudgetArray[i].budget_name}</option>
                            {/section}                                            
                            </select>
		                </dd>
                        <section class="clear"></section>
                    </dl>
                    
                    <dl>
                        <dt><label>Postal Code : </label></dt>
                        <dd><input type="text" class="input" name="postcode" id="postcode" value="{$job_details.area}" maxlength="15"/></dd>
                        <section class="clear"></section>
                    </dl>
                    <section class="clear"></section>
                    <dl>
                        <dt><label>Job Photo : </label></dt>
                        <dd>{if $job_details.image}
                        		<section class="">
                                <img src="{$siteroot}/includes/image.php?width=130&amp;height=130&amp;image={$siteroot}/uploads/job/{$job_details.image}" title="job logo" alt="job logo"/>
                                </section>
                         	{else}	
                            <section class="">
                            	<img src="{$siteroot}/uploads/job/featredjob_img1.jpg" height="130px" width="130px"  />
                                </section>
                            {/if}  
                            <input type="file" id="joblogo" name="joblogo"  />     
                         </dd>
                        <section class="clear"></section>
                    </dl>
                    <section class="clear"></section>
                  
                    
                    <section class="bt_save_wrapp">
                    	<input type="submit" value="Save" name="save_btn" id="save_btn" class="bt_save"/>
                        <input type="button" value="Cancel" name="cancel_btn" id="cancel_btn" class="bt_save" onclick="window.location.href='{$siteroot}/jobs/myjobs/'"/>
                    </section>

                </section>                
                </form>
            </section>
        <!-- dashboard Right Content End -->
        	<section class="clear"></section>
    </section>
</section>
{include file=$footer}
